<?php


abstract class BaseRingtoneStatistic extends BaseObject  implements Persistent {


	
	protected static $peer;


	
	protected $id;


	
	protected $ringtone_id;


	
	protected $download_today = 0;


	
	protected $download_this_week = 0;


	
	protected $download_this_month = 0;


	
	protected $download_total = 0;


	
	protected $download_yesterday;


	
	protected $download_last_week = 0;


	
	protected $download_last_month;


	
	protected $comment_today = 0;


	
	protected $comment_this_week = 0;


	
	protected $comment_this_month = 0;


	
	protected $comment_total = 0;


	
	protected $set_today = 0;


	
	protected $set_this_week = 0;


	
	protected $set_this_month = 0;


	
	protected $set_total = 0;


	
	protected $set_yesterday;


	
	protected $set_last_week = 0;


	
	protected $set_last_month;

	
	protected $alreadyInSave = false;

	
	protected $alreadyInValidation = false;

	
	public function getId()
	{

		return $this->id;
	}

	
	public function getRingtoneId()
	{

		return $this->ringtone_id;
	}

	
	public function getDownloadToday()
	{

		return $this->download_today;
	}

	
	public function getDownloadThisWeek()
	{

		return $this->download_this_week;
	}

	
	public function getDownloadThisMonth()
	{

		return $this->download_this_month;
	}

	
	public function getDownloadTotal()
	{

		return $this->download_total;
	}

	
	public function getDownloadYesterday()
	{

		return $this->download_yesterday;
	}

	
	public function getDownloadLastWeek()
	{

		return $this->download_last_week;
	}

	
	public function getDownloadLastMonth()
	{

		return $this->download_last_month;
	}

	
	public function getCommentToday()
	{

		return $this->comment_today;
	}

	
	public function getCommentThisWeek()
	{

		return $this->comment_this_week;
	}

	
	public function getCommentThisMonth()
	{

		return $this->comment_this_month;
	}

	
	public function getCommentTotal()
	{

		return $this->comment_total;
	}

	
	public function getSetToday()
	{

		return $this->set_today;
	}

	
	public function getSetThisWeek()
	{

		return $this->set_this_week;
	}

	
	public function getSetThisMonth()
	{

		return $this->set_this_month;
	}

	
	public function getSetTotal()
	{

		return $this->set_total;
	}

	
	public function getSetYesterday()
	{

		return $this->set_yesterday;
	}

	
	public function getSetLastWeek()
	{

		return $this->set_last_week;
	}

	
	public function getSetLastMonth()
	{

		return $this->set_last_month;
	}

	
	public function setId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->id !== $v) {
			$this->id = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::ID;
		}

	} 
	
	public function setRingtoneId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->ringtone_id !== $v) {
			$this->ringtone_id = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::RINGTONE_ID;
		}

	} 
	
	public function setDownloadToday($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->download_today !== $v || $v === 0) {
			$this->download_today = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::DOWNLOAD_TODAY;
		}

	} 
	
	public function setDownloadThisWeek($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->download_this_week !== $v || $v === 0) {
			$this->download_this_week = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::DOWNLOAD_THIS_WEEK;
		}

	} 
	
	public function setDownloadThisMonth($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->download_this_month !== $v || $v === 0) {
			$this->download_this_month = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::DOWNLOAD_THIS_MONTH;
		}

	} 
	
	public function setDownloadTotal($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->download_total !== $v || $v === 0) {
			$this->download_total = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::DOWNLOAD_TOTAL;
		}

	} 
	
	public function setDownloadYesterday($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->download_yesterday !== $v) {
			$this->download_yesterday = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::DOWNLOAD_YESTERDAY;
		}

	} 
	
	public function setDownloadLastWeek($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->download_last_week !== $v || $v === 0) {
			$this->download_last_week = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::DOWNLOAD_LAST_WEEK;
		}

	} 
	
	public function setDownloadLastMonth($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->download_last_month !== $v) {
			$this->download_last_month = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::DOWNLOAD_LAST_MONTH;
		}

	} 
	
	public function setCommentToday($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->comment_today !== $v || $v === 0) {
			$this->comment_today = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::COMMENT_TODAY;
		}

	} 
	
	public function setCommentThisWeek($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->comment_this_week !== $v || $v === 0) {
			$this->comment_this_week = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::COMMENT_THIS_WEEK;
		}

	} 
	
	public function setCommentThisMonth($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->comment_this_month !== $v || $v === 0) {
			$this->comment_this_month = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::COMMENT_THIS_MONTH;
		}

	} 
	
	public function setCommentTotal($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->comment_total !== $v || $v === 0) {
			$this->comment_total = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::COMMENT_TOTAL;
		}

	} 
	
	public function setSetToday($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->set_today !== $v || $v === 0) {
			$this->set_today = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::SET_TODAY;
		}

	} 
	
	public function setSetThisWeek($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->set_this_week !== $v || $v === 0) {
			$this->set_this_week = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::SET_THIS_WEEK;
		}

	} 
	
	public function setSetThisMonth($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->set_this_month !== $v || $v === 0) {
			$this->set_this_month = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::SET_THIS_MONTH;
		}

	} 
	
	public function setSetTotal($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->set_total !== $v || $v === 0) {
			$this->set_total = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::SET_TOTAL;
		}

	} 
	
	public function setSetYesterday($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->set_yesterday !== $v) {
			$this->set_yesterday = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::SET_YESTERDAY;
		}

	} 
	
	public function setSetLastWeek($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->set_last_week !== $v || $v === 0) {
			$this->set_last_week = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::SET_LAST_WEEK;
		}

	} 
	
	public function setSetLastMonth($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->set_last_month !== $v) {
			$this->set_last_month = $v;
			$this->modifiedColumns[] = RingtoneStatisticPeer::SET_LAST_MONTH;
		}

	} 
	
	public function hydrate(ResultSet $rs, $startcol = 1)
	{
		try {

			$this->id = $rs->getInt($startcol + 0);

			$this->ringtone_id = $rs->getInt($startcol + 1);

			$this->download_today = $rs->getInt($startcol + 2);

			$this->download_this_week = $rs->getInt($startcol + 3);

			$this->download_this_month = $rs->getInt($startcol + 4);

			$this->download_total = $rs->getInt($startcol + 5);

			$this->download_yesterday = $rs->getInt($startcol + 6);

			$this->download_last_week = $rs->getInt($startcol + 7);

			$this->download_last_month = $rs->getInt($startcol + 8);

			$this->comment_today = $rs->getInt($startcol + 9);

			$this->comment_this_week = $rs->getInt($startcol + 10);

			$this->comment_this_month = $rs->getInt($startcol + 11);

			$this->comment_total = $rs->getInt($startcol + 12);

			$this->set_today = $rs->getInt($startcol + 13);

			$this->set_this_week = $rs->getInt($startcol + 14);

			$this->set_this_month = $rs->getInt($startcol + 15);

			$this->set_total = $rs->getInt($startcol + 16);

			$this->set_yesterday = $rs->getInt($startcol + 17);

			$this->set_last_week = $rs->getInt($startcol + 18);

			$this->set_last_month = $rs->getInt($startcol + 19);

			$this->resetModified();

			$this->setNew(false);

						return $startcol + 20; 
		} catch (Exception $e) {
			throw new PropelException("Error populating RingtoneStatistic object", $e);
		}
	}

	
	public function delete($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("This object has already been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(RingtoneStatisticPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			RingtoneStatisticPeer::doDelete($this, $con);
			$this->setDeleted(true);
			$con->commit();
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	public function save($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("You cannot save an object that has been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(RingtoneStatisticPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			$affectedRows = $this->doSave($con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	protected function doSave($con)
	{
		$affectedRows = 0; 		if (!$this->alreadyInSave) {
			$this->alreadyInSave = true;


						if ($this->isModified()) {
				if ($this->isNew()) {
					$pk = RingtoneStatisticPeer::doInsert($this, $con);
					$affectedRows += 1; 										 										 
					$this->setId($pk);  
					$this->setNew(false);
				} else {
					$affectedRows += RingtoneStatisticPeer::doUpdate($this, $con);
				}
				$this->resetModified(); 			}

			$this->alreadyInSave = false;
		}
		return $affectedRows;
	} 
	
	protected $validationFailures = array();

	
	public function getValidationFailures()
	{
		return $this->validationFailures;
	}

	
	public function validate($columns = null)
	{
		$res = $this->doValidate($columns);
		if ($res === true) {
			$this->validationFailures = array();
			return true;
		} else {
			$this->validationFailures = $res;
			return false;
		}
	}

	
	protected function doValidate($columns = null)
	{
		if (!$this->alreadyInValidation) {
			$this->alreadyInValidation = true;
			$retval = null;

			$failureMap = array();


			if (($retval = RingtoneStatisticPeer::doValidate($this, $columns)) !== true) {
				$failureMap = array_merge($failureMap, $retval);
			}



			$this->alreadyInValidation = false;
		}

		return (!empty($failureMap) ? $failureMap : true);
	}

	
	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = RingtoneStatisticPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->getByPosition($pos);
	}

	
	public function getByPosition($pos)
	{
		switch($pos) {
			case 0:
				return $this->getId();
				break;
			case 1:
				return $this->getRingtoneId();
				break;
			case 2:
				return $this->getDownloadToday();
				break;
			case 3:
				return $this->getDownloadThisWeek();
				break;
			case 4:
				return $this->getDownloadThisMonth();
				break;
			case 5:
				return $this->getDownloadTotal();
				break;
			case 6:
				return $this->getDownloadYesterday();
				break;
			case 7:
				return $this->getDownloadLastWeek();
				break;
			case 8:
				return $this->getDownloadLastMonth();
				break;
			case 9:
				return $this->getCommentToday();
				break;
			case 10:
				return $this->getCommentThisWeek();
				break;
			case 11:
				return $this->getCommentThisMonth();
				break;
			case 12:
				return $this->getCommentTotal();
				break;
			case 13:
				return $this->getSetToday();
				break;
			case 14:
				return $this->getSetThisWeek();
				break;
			case 15:
				return $this->getSetThisMonth();
				break;
			case 16:
				return $this->getSetTotal();
				break;
			case 17:
				return $this->getSetYesterday();
				break;
			case 18:
				return $this->getSetLastWeek();
				break;
			case 19:
				return $this->getSetLastMonth();
				break;
			default:
				return null;
				break;
		} 	}

	
	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = RingtoneStatisticPeer::getFieldNames($keyType);
		$result = array(
			$keys[0] => $this->getId(),
			$keys[1] => $this->getRingtoneId(),
			$keys[2] => $this->getDownloadToday(),
			$keys[3] => $this->getDownloadThisWeek(),
			$keys[4] => $this->getDownloadThisMonth(),
			$keys[5] => $this->getDownloadTotal(),
			$keys[6] => $this->getDownloadYesterday(),
			$keys[7] => $this->getDownloadLastWeek(),
			$keys[8] => $this->getDownloadLastMonth(),
			$keys[9] => $this->getCommentToday(),
			$keys[10] => $this->getCommentThisWeek(),
			$keys[11] => $this->getCommentThisMonth(),
			$keys[12] => $this->getCommentTotal(),
			$keys[13] => $this->getSetToday(),
			$keys[14] => $this->getSetThisWeek(),
			$keys[15] => $this->getSetThisMonth(),
			$keys[16] => $this->getSetTotal(),
			$keys[17] => $this->getSetYesterday(),
			$keys[18] => $this->getSetLastWeek(),
			$keys[19] => $this->getSetLastMonth(),
		);
		return $result;
	}

	
	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = RingtoneStatisticPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->setByPosition($pos, $value);
	}

	
	public function setByPosition($pos, $value)
	{
		switch($pos) {
			case 0:
				$this->setId($value);
				break;
			case 1:
				$this->setRingtoneId($value);
				break;
			case 2:
				$this->setDownloadToday($value);
				break;
			case 3:
				$this->setDownloadThisWeek($value);
				break;
			case 4:
				$this->setDownloadThisMonth($value);
				break;
			case 5:
				$this->setDownloadTotal($value);
				break;
			case 6:
				$this->setDownloadYesterday($value);
				break;
			case 7:
				$this->setDownloadLastWeek($value);
				break;
			case 8:
				$this->setDownloadLastMonth($value);
				break;
			case 9:
				$this->setCommentToday($value);
				break;
			case 10:
				$this->setCommentThisWeek($value);
				break;
			case 11:
				$this->setCommentThisMonth($value);
				break;
			case 12:
				$this->setCommentTotal($value);
				break;
			case 13:
				$this->setSetToday($value);
				break;
			case 14:
				$this->setSetThisWeek($value);
				break;
			case 15:
				$this->setSetThisMonth($value);
				break;
			case 16:
				$this->setSetTotal($value);
				break;
			case 17:
				$this->setSetYesterday($value);
				break;
			case 18:
				$this->setSetLastWeek($value);
				break;
			case 19:
				$this->setSetLastMonth($value);
				break;
		} 	}

	
	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = RingtoneStatisticPeer::getFieldNames($keyType);

		if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
		if (array_key_exists($keys[1], $arr)) $this->setRingtoneId($arr[$keys[1]]);
		if (array_key_exists($keys[2], $arr)) $this->setDownloadToday($arr[$keys[2]]);
		if (array_key_exists($keys[3], $arr)) $this->setDownloadThisWeek($arr[$keys[3]]);
		if (array_key_exists($keys[4], $arr)) $this->setDownloadThisMonth($arr[$keys[4]]);
		if (array_key_exists($keys[5], $arr)) $this->setDownloadTotal($arr[$keys[5]]);
		if (array_key_exists($keys[6], $arr)) $this->setDownloadYesterday($arr[$keys[6]]);
		if (array_key_exists($keys[7], $arr)) $this->setDownloadLastWeek($arr[$keys[7]]);
		if (array_key_exists($keys[8], $arr)) $this->setDownloadLastMonth($arr[$keys[8]]);
		if (array_key_exists($keys[9], $arr)) $this->setCommentToday($arr[$keys[9]]);
		if (array_key_exists($keys[10], $arr)) $this->setCommentThisWeek($arr[$keys[10]]);
		if (array_key_exists($keys[11], $arr)) $this->setCommentThisMonth($arr[$keys[11]]);
		if (array_key_exists($keys[12], $arr)) $this->setCommentTotal($arr[$keys[12]]);
		if (array_key_exists($keys[13], $arr)) $this->setSetToday($arr[$keys[13]]);
		if (array_key_exists($keys[14], $arr)) $this->setSetThisWeek($arr[$keys[14]]);
		if (array_key_exists($keys[15], $arr)) $this->setSetThisMonth($arr[$keys[15]]);
		if (array_key_exists($keys[16], $arr)) $this->setSetTotal($arr[$keys[16]]);
		if (array_key_exists($keys[17], $arr)) $this->setSetYesterday($arr[$keys[17]]);
		if (array_key_exists($keys[18], $arr)) $this->setSetLastWeek($arr[$keys[18]]);
		if (array_key_exists($keys[19], $arr)) $this->setSetLastMonth($arr[$keys[19]]);
	}

	
	public function buildCriteria()
	{
		$criteria = new Criteria(RingtoneStatisticPeer::DATABASE_NAME);

		if ($this->isColumnModified(RingtoneStatisticPeer::ID)) $criteria->add(RingtoneStatisticPeer::ID, $this->id);
		if ($this->isColumnModified(RingtoneStatisticPeer::RINGTONE_ID)) $criteria->add(RingtoneStatisticPeer::RINGTONE_ID, $this->ringtone_id);
		if ($this->isColumnModified(RingtoneStatisticPeer::DOWNLOAD_TODAY)) $criteria->add(RingtoneStatisticPeer::DOWNLOAD_TODAY, $this->download_today);
		if ($this->isColumnModified(RingtoneStatisticPeer::DOWNLOAD_THIS_WEEK)) $criteria->add(RingtoneStatisticPeer::DOWNLOAD_THIS_WEEK, $this->download_this_week);
		if ($this->isColumnModified(RingtoneStatisticPeer::DOWNLOAD_THIS_MONTH)) $criteria->add(RingtoneStatisticPeer::DOWNLOAD_THIS_MONTH, $this->download_this_month);
		if ($this->isColumnModified(RingtoneStatisticPeer::DOWNLOAD_TOTAL)) $criteria->add(RingtoneStatisticPeer::DOWNLOAD_TOTAL, $this->download_total);
		if ($this->isColumnModified(RingtoneStatisticPeer::DOWNLOAD_YESTERDAY)) $criteria->add(RingtoneStatisticPeer::DOWNLOAD_YESTERDAY, $this->download_yesterday);
		if ($this->isColumnModified(RingtoneStatisticPeer::DOWNLOAD_LAST_WEEK)) $criteria->add(RingtoneStatisticPeer::DOWNLOAD_LAST_WEEK, $this->download_last_week);
		if ($this->isColumnModified(RingtoneStatisticPeer::DOWNLOAD_LAST_MONTH)) $criteria->add(RingtoneStatisticPeer::DOWNLOAD_LAST_MONTH, $this->download_last_month);
		if ($this->isColumnModified(RingtoneStatisticPeer::COMMENT_TODAY)) $criteria->add(RingtoneStatisticPeer::COMMENT_TODAY, $this->comment_today);
		if ($this->isColumnModified(RingtoneStatisticPeer::COMMENT_THIS_WEEK)) $criteria->add(RingtoneStatisticPeer::COMMENT_THIS_WEEK, $this->comment_this_week);
		if ($this->isColumnModified(RingtoneStatisticPeer::COMMENT_THIS_MONTH)) $criteria->add(RingtoneStatisticPeer::COMMENT_THIS_MONTH, $this->comment_this_month);
		if ($this->isColumnModified(RingtoneStatisticPeer::COMMENT_TOTAL)) $criteria->add(RingtoneStatisticPeer::COMMENT_TOTAL, $this->comment_total);
		if ($this->isColumnModified(RingtoneStatisticPeer::SET_TODAY)) $criteria->add(RingtoneStatisticPeer::SET_TODAY, $this->set_today);
		if ($this->isColumnModified(RingtoneStatisticPeer::SET_THIS_WEEK)) $criteria->add(RingtoneStatisticPeer::SET_THIS_WEEK, $this->set_this_week);
		if ($this->isColumnModified(RingtoneStatisticPeer::SET_THIS_MONTH)) $criteria->add(RingtoneStatisticPeer::SET_THIS_MONTH, $this->set_this_month);
		if ($this->isColumnModified(RingtoneStatisticPeer::SET_TOTAL)) $criteria->add(RingtoneStatisticPeer::SET_TOTAL, $this->set_total);
		if ($this->isColumnModified(RingtoneStatisticPeer::SET_YESTERDAY)) $criteria->add(RingtoneStatisticPeer::SET_YESTERDAY, $this->set_yesterday);
		if ($this->isColumnModified(RingtoneStatisticPeer::SET_LAST_WEEK)) $criteria->add(RingtoneStatisticPeer::SET_LAST_WEEK, $this->set_last_week);
		if ($this->isColumnModified(RingtoneStatisticPeer::SET_LAST_MONTH)) $criteria->add(RingtoneStatisticPeer::SET_LAST_MONTH, $this->set_last_month);

		return $criteria;
	}

	
	public function buildPkeyCriteria()
	{
		$criteria = new Criteria(RingtoneStatisticPeer::DATABASE_NAME);

		$criteria->add(RingtoneStatisticPeer::ID, $this->id);

		return $criteria;
	}

	
	public function getPrimaryKey()
	{
		return $this->getId();
	}

	
	public function setPrimaryKey($key)
	{
		$this->setId($key);
	}

	
	public function copyInto($copyObj, $deepCopy = false)
	{

		$copyObj->setRingtoneId($this->ringtone_id);

		$copyObj->setDownloadToday($this->download_today);

		$copyObj->setDownloadThisWeek($this->download_this_week);

		$copyObj->setDownloadThisMonth($this->download_this_month);

		$copyObj->setDownloadTotal($this->download_total);

		$copyObj->setDownloadYesterday($this->download_yesterday);

		$copyObj->setDownloadLastWeek($this->download_last_week);

		$copyObj->setDownloadLastMonth($this->download_last_month);

		$copyObj->setCommentToday($this->comment_today);

		$copyObj->setCommentThisWeek($this->comment_this_week);

		$copyObj->setCommentThisMonth($this->comment_this_month);

		$copyObj->setCommentTotal($this->comment_total);

		$copyObj->setSetToday($this->set_today);

		$copyObj->setSetThisWeek($this->set_this_week);

		$copyObj->setSetThisMonth($this->set_this_month);

		$copyObj->setSetTotal($this->set_total);

		$copyObj->setSetYesterday($this->set_yesterday);

		$copyObj->setSetLastWeek($this->set_last_week);

		$copyObj->setSetLastMonth($this->set_last_month);


		$copyObj->setNew(true);

		$copyObj->setId(NULL); 
	}

	
	public function copy($deepCopy = false)
	{
				$clazz = get_class($this);
		$copyObj = new $clazz();
		$this->copyInto($copyObj, $deepCopy);
		return $copyObj;
	}

	
	public function getPeer()
	{
		if (self::$peer === null) {
			self::$peer = new RingtoneStatisticPeer();
		}
		return self::$peer;
	}

} 